<?php	
	$sql="SELECT * FROM tbl_config";
	$res=mysql_query($sql);
			
	if(!$res)
		die();
?>
<form name="f" method="POST" action='?zone=config'>
	<input type="hidden" name="key"></input>
	<input type="hidden" name="act" value='update'></input>
	<table class='tbl_view' >
		<thead>
			<tr id='first'>
				<td></td>
				<td><span>Tham số</span></th>
				<td><span>Giá trị</span></td>
				<td></td>
				<td></td>
			</tr>
		</thead>
		<tbody>
			<?php 
			$i=1;
			while($row=mysql_fetch_array($res))
			{
			?>
			<tr>
				<td id='order'>
					<span><?php echo($i++);?></span>				
				</td>
				<td width="20%"><?php echo($row["name"]);?></td>
				<td>
					<?php 
						if($row["key"]=="pword")
						{
							for($j=0;$j<strlen($row["content"]);$j++)
								echo("*");
						}
						else
						{
							$content=strip_tags($row["content"]);
							echo(substr($content,0,3000));
						}
					?>
				</td>
				<td id='manager' style='width:45px'>
					<span onclick="f.key.value='<?php echo $row["key"]?>';f.submit();">Sửa</span>
				</td>
			</tr>
			<?php 
			}
			?>
		</tbody>
	</table>
</form>

